package resource.common.icon;

import java.io.File;

public class IconTools {
	public static void main(String[] args) {
		String p = IconTools.class.getResource(".").getPath();
		p = p.substring(1);
		File f = new File(p+"16/");
		File[] icons = f.listFiles();
		for(File icon : icons){
			/*System.out.println(".icon-"+getFileNameNoEx(icon.getName())+"{");
			System.out.println("	background:url('16/"+icon.getName()+"') no-repeat center center;");
			System.out.println("}");*/
			System.out.print("\"icon-"+getFileNameNoEx(icon.getName())+"\",");
		}
	}
	
	public static String getFileNameNoEx(String filename) { 
        if ((filename != null) && (filename.length() > 0)) { 
            int dot = filename.lastIndexOf('.'); 
            if ((dot >-1) && (dot < (filename.length()))) { 
                return filename.substring(0, dot); 
            } 
        } 
        return filename; 
    }
}
